dicts = {'POST': 0, 'GET': 0}
logs = '''
111.30.144.7 "POST /mock/login/?t=GET HTTP/1.1" 200 
111.30.144.7 "Get /mock/users/?t=POST HTTP/1.1" 200 
111.13.100.92 "Post /mock/login/ HTTP/1.1" 200 
223.88.60.88 "GET /mock/users/?t=POST HTTP/1.1" 200 
111.30.144.7 "GET /mock/users/ HTTP/1.1" 200 
'''

pro_flag = True
def  statistic(logs):
    log_lines = logs.split('\n')
    for line in log_lines:
        if line == '':
            continue
        else:
            col2_content = line.split(' ')[1]
            if col2_content.lower().strip('"') == 'post':
                dicts['POST'] += 1
            elif col2_content.lower().strip('"') == 'get':
                dicts['GET'] += 1
    print('POST请求次数: {}'.format(dicts['POST']))
    print('GET请求次数: {}'.format(dicts['GET']))

statistic(logs)